package com.palmgo.utils.drawer.model;

/**
 * Created by mm on 15/11/5.
 */
public class RectF {
    public double left;
    public double top;
    public double right;
    public double bottom;

    public RectF(double left, double top, double right, double bottom) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
    }
    public RectF() {
    }
    public RectF(RectF rectF) {
        if (rectF==null) return;
        this.left = rectF.left;
        this.top = rectF.top;
        this.right = rectF.right;
        this.bottom = rectF.bottom;
    }
    @Override
    public String toString() {
    	return left+"/"+top+"/"+right+"/"+bottom;
    }
    public double width(){
    	return right-left;
    }
    public double height(){
    	return bottom-top;
    }
	public void set(double l, double d, double r, double b) {
		this.left = l;
        this.top = d;
        this.right = r;
        this.bottom = b;
	}
}
